home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Utilities Professional 1-1500
/
Utilities Professional 1-1500 (1994)(WPD)[!].iso
/
07511000
/
var0888.dms
/
var0888.adf
/
WoManD
/
man
/
C_Library
/
atof
< prev
next >
Wrap
Text File
|
1992-09-19
|
1KB
|
32 lines
ATOF(1) C LIBRARY FUNCTIONS ATOF(1)
NAME
atof, strtod - convert string to double-precision number.
SYNOPSIS
double strtod(const char *str, char **end_ptr);
double atof(char *str);
INCLUDE FILE
stdlib.h
DESCRIPTION
strtod() returns as a double-precision floating-point number the value
represented by the character string pointed to by str. The string
is scanned up to the first unrecognized character.
If the value of end_ptr is not (char **)NULL, a pointer to the
character terminating the scan is returned in the location pointed
to by end_ptr. If no number can be formed, *end_ptr is set to str,
0.0 is returned. On overflow, zero is returned and ERANGE is
stored in errno.
atof(str) is equivalent to strtod(str, (char **)NULL). Thus, when
atof(str) returns 0.0 there is no way to determine whether str
contained a valid numerical string representing 0.0 or an invalid
numerical string.
SEE ALSO
scanf(), atoi().